﻿using LevelEditor.Model.Entity;
using LevelEditor.Model.IO;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LevelEditor.Model.Services
{
    public class IDsService
    {
        // Fields
        private static IDs ids;

        // Methods
        public static int GetNewLevelID()
        {
            ids.LevelID++;
            UIdIO.SaveIDs(ids);
            return ids.LevelID;
        }

        public static int GetNewSpriteID()
        {
            ids.SpriteID++;
            UIdIO.SaveIDs(ids);
            return ids.SpriteID;
        }

        public static int GetNewSpriteSheetID()
        {
            ids.SpriteSheetID++;
            UIdIO.SaveIDs(ids);
            return ids.SpriteSheetID;
        }

        public static void Init()
        {
            ids = UIdIO.LoadIDs();
        }
    }


}
